package gek.uni.diplom.ocl.example.managers;

import java.util.Collection;
import java.util.HashSet;

public class ErrorManager {
  private static Collection<Object> errors = new HashSet<Object>();
  private static Collection<Object> warnings = new HashSet<Object>();
  private static Boolean notifieable = true;
  
  public static void addError(Object error){
    errors.add(error);
    if (notifieable)
      printError(error);
  }

  public static void addWarning(String warning) {
    warnings.add(warning);
    if (notifieable)
      printWarning(warning);
  }
  
  private static void printError(Object error){
    System.out.println(error.toString());
  }
  
  private static void printWarning(Object warning){
    System.out.println(warning.toString());
  }
  
  
}
